
Last chance! 50% off unlimited learning
Sale ends in
Takes a colour defined in hex format as #XXXXXX
and adds a two transparency bytes XX
based on a number from 0 to 1. Its main use is to make RColorBrewer palettes transparent.
add.alpha(hex.color.list,alpha)
A list of strings defining transparent colours in eight byte format.
A list of strings defining solid colors in six byte format.
A value (or list of values) from 0 to 1 specifying transparency.
Chris Brunsdon
# Make a list of semi-transparent RColorBrewer colours, based on Brewer's Red palette with 5 shades
require(RColorBrewer)
add.alpha(brewer.pal(5,'Reds'),0.5)
Run the code above in your browser using DataLab